home *** CD-ROM | disk | FTP | other *** search
/ CGI How-To / CGI HOW-TO.iso / chap7 / 7_2 / ht72b.txt < prev   
Encoding:
Text File  |  1996-06-15  |  371 b   |  19 lines

  1. #!/usr2/local/bin/perl -w
  2.  
  3. $| = 1;
  4. print "Content-type: image/gif\n\n";
  5.  
  6. open GP, "| /usr/bin/gnuplot " .
  7.          "| /usr2/local/netpbm/bin/ppmtogif -interlace";
  8.  
  9. print GP <<GPH;
  10. set terminal pbm color   # select the ppm device driver
  11. set size 0.5,0.5         # render at half the normal size
  12. plot sin(x)              # a very simple gnuplot program
  13. GPH
  14.  
  15. close GP;
  16.  
  17. 1;
  18.  
  19.